package com.hist.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.hist.dao.LoginDao;
import com.hist.service.LoginService;

@Service
public class LoginServiceImpl implements LoginService{
     
	  @Autowired
	  LoginDao dao;
	  
	  @Override
	  public Integer checkUsername(Integer username)
	  {
		   return dao.checkUsername(username);
	  }

	@Override
	public void insertLogin(Integer username, String password) {
		// TODO Auto-generated method stub
		dao.insertLogin(username,password);
	}
	
	/*增加学生*/
	  public void insertStudent(Integer sno,String sname,String ssex,Integer sage,String sdept,String smajor,Integer sgrade,Integer school_length,String saddress,String spol,String snation,String srp,String smove)
	  {
		  dao.insertStudent(sno,sname,ssex,sage,sdept,smajor,sgrade,school_length,saddress,spol,snation,srp,smove);
	  }

	@Override
	public Integer getLogin(Integer username, String password) {
		// TODO Auto-generated method stub
		return dao.getLogin(username, password);
	}
}
